package com.web.controller;

import com.core.shared.ResponseHandle;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-12-24
 * Time: 下午4:00
 * To change this template use File | Settings | File Templates.
 */
@RequestMapping("/js")
@Controller
public class JsonpController {

    @RequestMapping(value = "tjs", method = RequestMethod.GET)
    @ResponseBody
    public Object testJsonp(HttpServletResponse response) {
        Map<String, Object> map = new HashMap<>();
        map.put("result", "SUCCESS");
//        map.put("callback", callback);
        ResponseHandle.optimizationResponse(response);
        return map;
    }

}
